package com.flurry.android;

import android.content.Context;
import android.text.TextUtils;
import java.util.Iterator;
import java.util.List;

final class dq
  implements gj
{
  private static final String p = dq.class.getSimpleName();

  private static boolean a(String paramString1, String paramString2, cs paramcs)
  {
    if ((TextUtils.isEmpty(paramString1)) || (TextUtils.isEmpty(paramString2)) || (paramcs == null))
      return false;
    boolean bool1;
    try
    {
      boolean bool2 = TextUtils.isEmpty(paramcs.az());
      bool1 = false;
      if (!bool2)
      {
        Class.forName(paramcs.az());
        bool1 = true;
      }
      if (!bool1)
      {
        cy.d(p, paramString1 + ": package=\"" + paramString2 + "\": apk should include ad provider library with name=\"" + paramcs.ax() + "\" and version=\"" + paramcs.ay() + "\" or higher");
        return bool1;
      }
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      while (true)
      {
        cy.a(6, p, "failed to find third party ad provider api with exception: ", localClassNotFoundException);
        bool1 = false;
      }
    }
    catch (ExceptionInInitializerError localExceptionInInitializerError)
    {
      while (true)
      {
        cy.a(6, p, "failed to initialize third party ad provider api with exception: ", localExceptionInInitializerError);
        bool1 = false;
      }
    }
    catch (LinkageError localLinkageError)
    {
      while (true)
      {
        cy.a(6, p, "failed to link third party ad provider api with exception: ", localLinkageError);
        bool1 = false;
      }
      new StringBuilder().append(paramString1).append(": package=\"").append(paramString2).append("\": apk has ad provider library with name=\"").append(paramcs.ax()).append("\" and version=\"").append(paramcs.ay()).append("\" or higher").toString();
    }
    return bool1;
  }

  public final boolean a(Context paramContext, gl paramgl)
  {
    if (paramgl == null);
    String str1;
    List localList;
    do
    {
      do
      {
        return false;
        str1 = paramgl.O();
      }
      while (TextUtils.isEmpty(str1));
      localList = paramgl.bG();
    }
    while (localList == null);
    String str2 = paramContext.getPackageName();
    Iterator localIterator = localList.iterator();
    boolean bool1 = true;
    if (localIterator.hasNext())
      if (a(str1, str2, (cs)localIterator.next()))
        break label89;
    label89: for (boolean bool2 = false; ; bool2 = bool1)
    {
      bool1 = bool2;
      break;
      return bool1;
    }
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.flurry.android.dq
 * JD-Core Version:    0.6.2
 */